package cn.threewaters.qtyy.dit.one.entity.base;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
public class OneBaseModel<T extends OneBaseModel<?>> extends Model<T> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6496427645943436619L;

	/**
	 * 活跃的，及没有删除的记录
	 */
	public static final Integer ACTIVE_FLAG_YES = 1;

	/**
	 * 不活跃的，及删除的记录
	 */
	public static final Integer ACTIVE_FLAG_NO = 0;

	@TableId
	@ApiModelProperty(value = "对象id，新增时为空，修改时不为空")
	protected String id;

	@ApiModelProperty(value = "删除标识", hidden = true)
	protected Integer activeFlag;

	@ApiModelProperty(value = "创建人", hidden = true)
	protected String createBy;

	@ApiModelProperty(value = "创建时间-时间戳", hidden = true)
	protected Date createDate;

	@ApiModelProperty(value = "修改人", hidden = true)
	protected String updateBy;

	@ApiModelProperty(value = "更新时间-时间戳", hidden = true)
	protected Date updateDate;

	@Override
	protected Serializable pkVal() {
		return id;
	}

}
